<?php
/**
 * 适配器模式----设计模式
 * Created by Jason.
 * User: Administrator
 * Date: 2019/12/7 0007
 * Time: 下午 3:40
 */

namespace app\index\service;

use app\index\interfaces\BookInterface;

/**
 * Class Book
 *  这里是一个适配器. 实现了 BookInterface
 * @package app\index\service
 */
class Book implements BookInterface
{
    private $page;

    public function open()
    {
        $this->page = 1;
    }

    public function getPage()
    {
        return $this->page;
    }

    public function turnPage()
    {
         $this->page++;
    }
}
